
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- <link rel="icon" href="../../favicon.ico"> -->

    <title>注册</title>

    <!-- Bootstrap core CSS -->
    <link href="./css/bootstrap-theme.css" rel="stylesheet">
    <link href="./css/bootstrap.css" rel="stylesheet">

    <link href="./css/common.css" rel="stylesheet">
    <link href="./css/login.css" rel="stylesheet">
  </head>

  <body class="page login register">
      <div class="wrap">
        <img src="./images/login_bg.jpg" alt="...">

        <!-- log_con-->
        <div class="log_con">
          <a href="./index.html"><img class="logo" src="./images/logo.png" alt="..."></a>
          <div class="info_wrap">
            <div class="mapping">
              <img class="login_mapping" src="./images/register.png" alt="...">
            </div>
            <div class="info">
              <div class="form">
                <div class="log_title">
                  <h4>用户注册</h4>
                  <a href="./login.html">已有账号，去登录</a>
                </div>
              </div>
              <div class="reg_info">
                <div class="phone reg_item "> 
                  <input type="text" class="form-control" aria-label="" placeholder="请输入手机号">
                </div>
                <div class="reg_item get_code">
                  <input type="text" class="form-control" aria-label="" placeholder="手机号">
                  <span class="input-group-addon" id="getCode">获取验证码</span>
                </div>
                <div class="reg_item "> 
                  <input type="text" class="form-control" aria-label="" placeholder="请输入您的姓名">
                </div>
                <div class="reg_item "> 
                  <input type="password" class="form-control" aria-label="" placeholder="请输入密码">
                </div>
                <div class="reg_item "> 
                  <input type="password" class="form-control" aria-label="" placeholder="请输入密码">
                </div> 
                <div class="reg_item select_item"> 
                  <i class="glyphicon glyphicon-lock"></i>
                  <select class="">
                    <option>请选择注册方</option>
                    <option>剧组</option>
                    <option>童星</option>
                  </select>
                </div> 
              </div>
              <img class="dou_line_up" src="./images/dou_up_line.png" alt="...">
              <img class="dou_line_down" src="./images/up_line.png" alt="...">
              <button type="button" class="btn btn-primary login_btn">注册</button>
            </div>
            <!-- <div style="clear: both;"></div> -->
            
          </div>
          <p class="explain">Copyright ＠东阳市横店影视城微电影有限公司, All Rights Reserved   浙ICP备00000000号-1</p>
        </div>
      </div>

     
   <script src="./js/jquery.min.js"></script>
   <script src="./js/bootstrap.js"></script>
  </body>
</html>


<script>
  $(function() {
    
    $('#getCode').on('click',function(){
      //接口获取成功后 调用
      getTime($(this),60);
    });
    

    function getTime(element,time){
      let num = time;
      let timeId = null;
      let ele = element;
      let _this = this;

      if (ele.hasClass("finished")) {
        return false;
      }
      ele.addClass("finished");
      timeId = setInterval(function() {
        if (num-- <= 1) {
          clearInterval(timeId);
          _this.disabled = false;
          ele.text("获取验证码");
          ele.removeClass("finished");
        } else {
          if (num < 10) {
            ele.text("0" + num + "后重新获取！");
          } else {
            ele.text(num + "后重新获取！");
          }
        }
      }, 1000);
    }//getTime
  });
</script>
